package com.lwj.service;

import com.github.pagehelper.PageInfo;
import com.lwj.entity.Project;
import com.lwj.entity.Team;
import com.lwj.entity.User;
import com.lwj.model.TeamMemberRes;
import com.lwj.model.TeamRes;
import com.lwj.util.DataRet;

import java.util.List;

/**
 * @author linwj
 * @date 2018/5/10 13:31
 */
public interface TeamService {
    /**
     * 团队创建
     * @param user
     * @param team
     * @return
     */
    DataRet<String> create(User user, Team team);

    /**
     * 邀请成员
     * @param user
     * @param teamId
     * @return
     */
    DataRet<String> invitationMember(User user, int teamId);

    /**
     * 分页获取用户团队信息
     * @param user
     * @param pageNo
     * @param pageSize
     * @return
     */
    PageInfo<TeamRes> get(User user, int pageNo, int pageSize);

    /**
     * 获取用户为队长的团队
     * @param user
     * @return
     */
    DataRet<List<Team>> getUserLeaderTeam(User user);

    /**
     * 用户团队状态验证：已加入/未加入
     * @param userId
     * @param teamId
     * @return
     */
    DataRet<String> userTeamValidation(int userId,int teamId);

    /**
     * 邀请用户
     * @param userId
     * @param teamId
     * @return
     */
    DataRet<String> inviteUser(int userId,int teamId);

    /**
     * 获取团队中用户信息
     * @param teamId
     * @return
     */
    DataRet<List<TeamMemberRes>> getTeamMemberInfo(User user,int teamId);
}
